package com.mmp.main.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the site database table.
 *
 */
@Entity
@Table(name = "site")
@NamedQuery(name = "Site.findAll", query = "SELECT s FROM Site s Where s.status=true Order By s.name")
public class Site implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	private Integer id;

	private String name;

	@Column(name = "bed_no")
	private Integer bedNo;

	@Column(name = "contains_several_locations")
	private Boolean containsSeveralLocations;

	@Column(name = "affiliated_health_centers_no")
	private Integer affiliatedHealthCentersNo;

	@Column(name = "affiliated_hospitals_no")
	private Integer affiliatedHospitalsNo;

	@ManyToOne
	@JoinColumn(name = "operating_company_id")
	private OperatingCompany operatingCompany;

	@Column(name = "bmd_supervisor_name")
	private String bmdSupervisorName;

	@Column(name = "bmd_head_name")
	private String bmdHeadName;

	@Column(name = "hosp_director_name")
	private String hospitalDirectorName;

	@Column(name = "site_manager_name")
	private String siteManagerName;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "contract_start_date")
	private Date contractStartDate;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "contract_end_date")
	private Date contractEndDate;

	@Column(name = "spare_parts_value")
	private Float sparePartsValue;

	@Column(name = "contract_total_value")
	private Float contractTotalValue;

	@Column(name = "ta3mid_no")
	private String ta3midNo;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "ta3mid_date")
	private Date ta3midDate;

	private Boolean status;

	public Site() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getBedNo() {
		return bedNo;
	}

	public void setBedNo(Integer bedNo) {
		this.bedNo = bedNo;
	}

	public Boolean getContainsSeveralLocations() {
		return containsSeveralLocations;
	}

	public void setContainsSeveralLocations(Boolean containsSeveralLocations) {
		this.containsSeveralLocations = containsSeveralLocations;
	}

	public Integer getAffiliatedHealthCentersNo() {
		return affiliatedHealthCentersNo;
	}

	public void setAffiliatedHealthCentersNo(Integer affiliatedHealthCentersNo) {
		this.affiliatedHealthCentersNo = affiliatedHealthCentersNo;
	}

	public Integer getAffiliatedHospitalsNo() {
		return affiliatedHospitalsNo;
	}

	public void setAffiliatedHospitalsNo(Integer affiliatedHospitalsNo) {
		this.affiliatedHospitalsNo = affiliatedHospitalsNo;
	}

	public OperatingCompany getOperatingCompany() {
		return operatingCompany;
	}

	public void setOperatingCompany(OperatingCompany operatingCompany) {
		this.operatingCompany = operatingCompany;
	}

	public String getBmdSupervisorName() {
		return bmdSupervisorName;
	}

	public void setBmdSupervisorName(String bmdSupervisorName) {
		this.bmdSupervisorName = bmdSupervisorName;
	}

	public String getBmdHeadName() {
		return bmdHeadName;
	}

	public void setBmdHeadName(String bmdHeadName) {
		this.bmdHeadName = bmdHeadName;
	}

	public String getHospitalDirectorName() {
		return hospitalDirectorName;
	}

	public void setHospitalDirectorName(String hospitalDirectorName) {
		this.hospitalDirectorName = hospitalDirectorName;
	}

	public String getSiteManagerName() {
		return siteManagerName;
	}

	public void setSiteManagerName(String siteManagerName) {
		this.siteManagerName = siteManagerName;
	}

	public Date getContractStartDate() {
		return contractStartDate;
	}

	public void setContractStartDate(Date contractStartDate) {
		this.contractStartDate = contractStartDate;
	}

	public Date getContractEndDate() {
		return contractEndDate;
	}

	public void setContractEndDate(Date contractEndDate) {
		this.contractEndDate = contractEndDate;
	}

	public Float getSparePartsValue() {
		return sparePartsValue;
	}

	public void setSparePartsValue(Float sparePartsValue) {
		this.sparePartsValue = sparePartsValue;
	}

	public Float getContractTotalValue() {
		return contractTotalValue;
	}

	public void setContractTotalValue(Float contractTotalValue) {
		this.contractTotalValue = contractTotalValue;
	}

	public String getTa3midNo() {
		return ta3midNo;
	}

	public void setTa3midNo(String ta3midNo) {
		this.ta3midNo = ta3midNo;
	}

	public Date getTa3midDate() {
		return ta3midDate;
	}

	public void setTa3midDate(Date ta3midDate) {
		this.ta3midDate = ta3midDate;
	}

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

}
